import {
	observer
} from 'mobx-react';
import {
	WeaDialog,
} from 'ecCom';
import {
	Loading,
} from '../../public/learn';
import DialogContent from './DialogContent';

@observer
export default class Dialog extends React.Component {
	constructor(props) {
		super(props);
	}

	getSubDialogContent = () => {
		return <div/>
	}

	render() {
		const {
			store,
			dialog,
			loading,
			style,
		} = this.props, {
			DIALOG,
			dialogStyle,
			dialogButtons,
			moreBtn,
			icon,
			iconBgcolor,
		} = store;

		return (
			<WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@iw4jnk`}
				{...DIALOG}
				{...dialog}
				style={style}
				buttons={dialogButtons}
				moreBtn={moreBtn}
				icon={icon}
				iconBgcolor={iconBgcolor}
				loading={loading}
			>
				<DialogContent ecId={`${this && this.props && this.props.ecId || ''}_DialogContent@ol60pn`} {...this.props} />
			</WeaDialog>
		);
	}
}